package com.hjq.fcloud.ui.adapter

import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentManager
import androidx.fragment.app.FragmentPagerAdapter
import com.hjq.fcloud.app.AppFragment
class CommonPagerAdapter(
    fm: FragmentManager?,
    private val tabEntitys: ArrayList<PagerAdapterBean>,
    val mTabFragments: ArrayList<Fragment>
) : FragmentPagerAdapter(
    fm!!
) {
    override fun getCount(): Int {
        return tabEntitys.size
    }

    override fun getPageTitle(position: Int): CharSequence? {
        return tabEntitys[position].title
    }

    override fun getItem(position: Int): Fragment {
        return mTabFragments[position]
    }

    class PagerAdapterBean(var title: String, var obj: Any? = null)
}